for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
export class Eloi {
constructor(OriginalDate = Date, { global = true } = {}) {
this._OriginalDate = OriginalDate;
this._setGlobal = global;
}
shift(offsetMs) {
const OriginalDate = this._OriginalDate;
OriginalDate
this._EloiDate = class extends OriginalDate {
constructor(...args) {
if (args.length === 0) {
super(OriginalDate.now() + offsetMs);
/** global: OriginalDate */
This checks looks for references to variables that have not been declared. This is most likey a typographical error or a variable has been renamed.
To learn more about declaring variables in Javascript, see the MDN.
} else {
super(...args);
static now() {
return OriginalDate.now() + offsetMs;
};
if (this._setGlobal) {
global.Date = this._EloiDate;
return this._EloiDate;
reset() {
global.Date = this._OriginalDate;
export default new Eloi();